package edu.hqu.rent_system.service.impl;

import edu.hqu.rent_system.mapper.HouseMapper;
import edu.hqu.rent_system.mapper.LandLordMapper;
import edu.hqu.rent_system.pojo.*;
import edu.hqu.rent_system.service.LandLordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class LandLordServiceIimpl implements LandLordService {
    @Autowired
    private LandLordMapper landLordMapper;

    @Override
    public int registerLandLord(LandLord landLord){
        return landLordMapper.registerLandLord(landLord);
    }

    @Override
    public int deleteLandLord(int lId){
        return landLordMapper.deleteLandLord(lId);
    }

    @Override
    public LandLord loginLandLord(int lId) {
        return landLordMapper.loginLandLord(lId);
    }

    @Override
    public List<LandLord> queryAllTLandlord() {
        return landLordMapper.queryAllTLandlord();
    }

    @Override
    public LandLord queryLandlordByPhone(String phone) {
        return landLordMapper.queryLandlordByPhone(phone);
    }

    @Override
    public int addHouse(House house) {
        return landLordMapper.addHouse(house);
    }

    @Override
    public List<House> selectHouse(int lId){
        return landLordMapper.selectHouse(lId);
    }

    @Override
    public int updateHouse(House house) {
       return landLordMapper.updateHouse(house);
    }

    @Override
    public int deleteHouse(int hId){
        return landLordMapper.deleteHouse(hId);
    }

    @Override
    public List<Meeting> selectMeeting(int lId){
        return landLordMapper.selectMeeting(lId);
    }

    @Override
    public List<Meeting> selectConfirmedMeeting(int lId){
        return landLordMapper.selectConfirmedMeeting(lId);
    }

    @Override
    public List<Meeting> selectRejectedMeeting(int lId){
        return landLordMapper.selectRejectedMeeting(lId);
    }

    @Override
    public int confirmMeeting(int mId){
        return landLordMapper.confirmMeeting(mId);
    }

    @Override
    public int rejectMeeting(int mId){
        return landLordMapper.rejectMeeting(mId);
    }

    @Override
    public List<Record> selectRecord(int lId){
        return landLordMapper.selectRecord(lId);
    }

    @Override
    public List<Pay> selectPay(int hId){
        return landLordMapper.selectPay(hId);
    }

    @Override
    public LandLord getLandLordInfo(int hId){
        return landLordMapper.getLandLordInfo(hId);
    }

    @Override
    public int updateLandLordInfo(LandLord landLord){
        return landLordMapper.updateLandLordInfo(landLord);
    }

    @Override
    public List<Tenant> selectTenantOfMine(int lId){
        return landLordMapper.selectTenantOfMine(lId);
    }

    @Override
    public int insertRecord(Record record){
        return landLordMapper.insertRecord(record);
    }

    @Override
    public House selectHouseByhId(int hId){
        return landLordMapper.selectHouseByhId(hId);
    }

    @Override
    public int insertPay(Pay pay){
        return landLordMapper.insertPay(pay);
    }
}
